#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QVector>
#include "ui_mainwindow.h"
#include "info.h"

class MainWindow : public QMainWindow
{
    Q_OBJECT

    Ui::MainWindow ui;
    QList<Info> data;
    Info curInfo;
    int curIndex;

    void saveDataToList();

public:
    explicit MainWindow(QWidget *parent = 0);

signals:

public slots:
    void showData(int row);
    void saveData();
    void newRow();

};

/*
        QObject::connect(listWidget, SIGNAL(currentRowChanged(int)), MainWindow, SLOT(showData(int)));
        QObject::connect(pushButton, SIGNAL(clicked()), MainWindow, SLOT(saveData()));
        QObject::connect(pushButton_2, SIGNAL(clicked()), MainWindow, SLOT(newRow()));
 */

#endif // MAINWINDOW_H
